{template 'public/header'}

{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_cjdianc/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}

    .store_td1{height: 45px;}

    .store_list_img{width: 60px;height: 60px;}

    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;text-align: center;}

    .yg5_tr2>td{padding: 15px;border: 1px solid #e5e5e5;}

    .yg5_tr1>td{

        border: 1px solid #e5e5e5;
        background-color: #FAFAFA;

        font-weight: bold;

    }

    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .check_img{width: 45px;height: 45px;}
    .ygrow{margin-top: 20px;}
    .yghuise{background-color: grey;color: white;}
    .yghuise:hover{background-color: grey;color: white;

    }
    .pa_0{
      padding: 10px 0;
    }
</style>


<ul class="nav nav-tabs">
  <span class="ygxian"></span>
  <div class="ygdangq">当前位置:</div>

  <!--<li   {if $type=='log'} class="active" {/if}><a href="{php echo $this->createWebUrl('yajin',array('type'=>log));}">押金记录</a></li>

  <li   {if $type=='now'} class="active" {/if}><a href="{php echo $this->createWebUrl('yajin',array('type'=>now,));}">用户押金库</a></li>-->
  <li   {if $type=='apply'} class="active" {/if}><a href="{php echo $this->createWebUrl('yajinrefund',array('type'=>apply,));}">用户退还押金申请列表</a></li>


</ul>



<div class="row ygrow">

    <div class="col-lg-12">

        <form action="" method="get" class="col-md-6">
            <input type="hidden" name="c" value="site" />
                   <input type="hidden" name="a" value="entry" />
                   <input type="hidden" name="m" value="zh_cjdianc" />
                   <input type="hidden" name="do" value="yajin" />
            <div class="input-group" style="width: 300px">

                <input type="text" name="keywords" class="form-control" placeholder="请输入用户名字">

                <span class="input-group-btn">

                    <input type="submit" class="btn btn-default" name="submit" value="查找"/>

                </span>

            </div>

            <input type="hidden" name="token" value="{$_W['token']}"/>

        </form>

        

    </div><!-- /.col-lg-6 -->

</div>  

<div class="main">

    <div class="panel panel-default">
		
        <div class="panel-heading">

            用户申请还桶记录

        </div>

        <div class="panel-body" style="padding: 0px 15px;">

            <div class="row">

                <table class="yg5_tabel col-md-12">
					        

		{if $type=='apply'}
		  <tr class="yg5_tr1">

			<td>用户</td>
			<td>退还金额</td>
			<td>处理状态</td>
			<td>申请时间</td>
			<td>操作</td>
			
			</tr>
			{loop $list $key $item}
			<tr class="yg5_tr2">
			  <td >{$item['username']}</td>
			  <td>{$item['money']}</td>
			  {if $item['state']==1}
			  <td>
				 待商户确认
			 </td>
			 {elseif $item['state']==2}
			 <td>
				 待平台确认
			 </td>
			 {elseif $item['state']==3}
			 <td>
				 退还成功
			 </td>
			 {elseif $item['state']==4}
			 <td>
				 拒绝退还
			 </td>
			 {/if}
			 
			 <td>{$item['time']}</td>

			 <td>
                      
				  {if $item['state']==1}
			 
				  <a class="btn btn-info btn-xs" href="{php echo $this->createWebUrl('yajinrefund',array('id'=>$item['id'],'op'=>'adopt'))}" >通过</a>
			
				  <a class="btn ygshouqian2 btn-xs" href="{php echo $this->createWebUrl('yajinrefund', array('id' => $item['id'],'op'=>'reject'))}" title="拒绝">拒绝</a>
				  {else}
				  --
				  {/if}
			   <!--    <a href="{php echo $this->createWebUrl('txlist', array('id' => $item['id'],'op'=>'delete'))}" class="storespan btn btn-xs" onclick="return confirm('确认删除吗？');return false;">
					  <span class="fa fa-trash-o"></span>
					  <span class="bianji">删除
						  <span class="arrowdown"></span>
					  </span>
				  </a> -->
				  <!-- <a class="btn btn-danger btn-xs" href="{php echo $this->createWebUrl('txlist', array('id' => $item['id'],'op'=>'delete'))}" onclick="return confirm('确认删除吗？');return false;" title="删除">删</a> -->

			  </td>
			 
			</tr>
			{/loop}
		  {/if}
             
          {if empty($list)}
          <tr class="yg5_tr2">
            <td colspan="9">
              暂无信息
          </td>
      </tr> 
      {/if}   

  </table>

</div>
		
</div>

</div>

</div>

<div class="text-right we7-margin-top">

   {$pager}

</div>

<script type="text/javascript">
    $(function(){
        // $("#frame-13").addClass("in");
		$("#frame-6").show();
        $("#yframe-6").addClass("wyactive");
        
    })
</script>